import socket

tmp_list = []
for i in range(10):
    # 实例客户端
    client = socket.socket()
    # 设置连接
    client.connect(('127.0.0.1', 8000))
    tmp_list.append(client) # 为了防止变量销毁
    print(i)
